<template>
  <div id="app">
    <nav>
      <router-link
        v-for="(route, index) in linkList"
        :to="route.router"
        :key="route.router"
      >
        <span v-if="index != 0"> | </span>
        <span class="route-name">{{ route.name }}</span>
      </router-link>
    </nav>
    <router-view />
  </div>
</template>
<script>
export default {
  name: "app",
  data() {
    return {
      linkList: [
        {
          name: "Home",
          router: "/"
        },
        {
          name: "China",
          router: "/china"
        },
        {
          name: "imgCheck",
          router: "/imgCheck"
        },
        {
          name: "输入框动态脱敏",
          router: "/desensitizeInput"
        },
        {
          name: "echart滑动切换数据范围",
          router: "/echartScroll"
        },
        {
          name: "锚点抠图",
          router: "/imgCut"
        },
        {
          name: "城市地图",
          router: "/ChinaCityMap"
        }
      ]
    };
  }
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  .route-name {
    font-weight: bold;
    font-size: larger;
  }
}

nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
